/**
 * Generali Solutions d'assurances - Tous droits réservés &copy; 2007 - 2010
 */

package fr.generali.relationclient.marketing.opt.listenomcampagne.builder;

import fr.generali.relationclient.marketing.opt.listenomcampagne.DtoCritereIdentifiant;

/**
 * @author Holmes Kelly
 */
public class DtoCritereIdentifiantBuilder extends DtoCritereIdentifiantBuilderBase<DtoCritereIdentifiantBuilder> {

    /**
     * constructeur
     */
    public DtoCritereIdentifiantBuilder() {
        super(new DtoCritereIdentifiant());
    }

    /**
     * @return DtoCritereIdentifiantBuilder
     */
    public static DtoCritereIdentifiantBuilder dtoCritereIdentifiant() {
        return new DtoCritereIdentifiantBuilder();
    }

    /**
     * @return DtoCritereIdentifiant
     */
    public DtoCritereIdentifiant build() {
        return getInstance();
    }
}

/**
 * @author Holmes Kelly
 * @param <GeneratorT>
 */
class DtoCritereIdentifiantBuilderBase<GeneratorT extends DtoCritereIdentifiantBuilderBase<GeneratorT>> {

    /**
     * instance
     */
    private DtoCritereIdentifiant instance;

    /**
     * @param aInstance instance
     */
    protected DtoCritereIdentifiantBuilderBase(DtoCritereIdentifiant aInstance) {
        instance = aInstance;
    }

    /**
     * @return instance
     */
    protected DtoCritereIdentifiant getInstance() {
        return instance;
    }

    /**
     * @param aValue identifiant
     * @return GeneratorT
     */
    @SuppressWarnings("unchecked")
    public GeneratorT buildIdentifiant(String aValue) {
        instance.setIdentifiant(aValue);

        return (GeneratorT ) this;
    }
}
